<tagLib name="mkrtags" />
<!--  功能操作区域  -->

<table width="100%" cellpadding="0" cellspacing="0" >
  <tr>
    <td width="60%">
	    <span><input type="button"  onclick="add()" class="button1" title="增加数据" value="增加数据" /> </span>
	    <span><input type="button"  onclick="edit()" class="button1" title="编辑数据" value="编辑数据" /> </span>
	    <span><input type="button"  onclick="view()" class="button1" title="查看详细数据" value="查看详细" /> </span>
	    <span><input type="button"  onclick="del()" class="button1" title="删除数据" value="删除数据" /> </span>
	    
		    <span>
			    <input type="button"  onclick="display('searchbox')" class="button1" title="搜索数据" value="搜索数据▼" />
			    <div class="searchbox" id="searchbox" style="display:none">
			        <table cellpadding="0" cellspacing="0">
			          <tr>
			            <td class="ewTableHeader">关键词:</td>
			            <td class="ewTableAltRow"><input id="searchkey" type="text"  name="searchkey"  value="{$searchkey}" /></td>
			          </tr>
			          <tr>
			          	<td class="ewTableHeader">条件:</td>
			            <td class="ewTableAltRow"><mkrtags:radio id="searchtype" name="searchtype"  outtable="Array" value="$searchtype" outfield="AND,OR" outkey="AND,OR" /></td>
			          </tr>
			          <tr>
			            <td colspan="2"  class="ewTableAltRow">
			            <input type="submit"   class="button1" value="搜索" />
			            <input type="button" name="delete" onclick="location.href='__URL__/index/'" class="button1" value="清空" />
			            </td>
			          </tr>
			        </table>
			    </div>
		    </span>
	    
		<span><input type="button"  onclick="location.reload();" class="button1" title="刷新数据" value="刷新数据" /> </span>
    </td>
  </tr>
</table>
<!-- 功能操作区域结束 -->
<!-- Myhtml 系统列表组件开始 -->
<table id="Event_List" class="list">
  <tr class="row">
    <th width="8">
		<input type="checkbox" id="check" onclick="CheckAll('Event_List')">
    </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Event','ajaxlist','aid','<php> echo getsorttype('aid');</php>','Event_Grid')"  title="按照资源ID排序">资源ID
      <php> echo getsorttype('aid',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Event','ajaxlist','deadline','<php> echo getsorttype('deadline');</php>','Event_Grid')"  title="按照报名截止时间排序">报名截止时间
      <php> echo getsorttype('deadline',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Event','ajaxlist','starttime','<php> echo getsorttype('starttime');</php>','Event_Grid')"  title="按照活动开始时间排序">活动开始时间
      <php> echo getsorttype('starttime',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Event','ajaxlist','endtime','<php> echo getsorttype('endtime');</php>','Event_Grid')"  title="按照活动结束时间排序">活动结束时间
      <php> echo getsorttype('endtime',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Event','ajaxlist','public','<php> echo getsorttype('public');</php>','Event_Grid')"  title="按照公开状态:0私密,1半公开,2完全公开排序">公开状态:0私密,1半公开,2完全公开
      <php> echo getsorttype('public',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Event','ajaxlist','membernum','<php> echo getsorttype('membernum');</php>','Event_Grid')"  title="按照成员数排序">成员数
      <php> echo getsorttype('membernum',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Event','ajaxlist','attending','<php> echo getsorttype('attending');</php>','Event_Grid')"  title="按照参与排序">参与
      <php> echo getsorttype('attending',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Event','ajaxlist','mightatten','<php> echo getsorttype('mightatten');</php>','Event_Grid')"  title="按照可能参与排序">可能参与
      <php> echo getsorttype('mightatten',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Event','ajaxlist','notattending','<php> echo getsorttype('notattending');</php>','Event_Grid')"  title="按照不参与排序">不参与
      <php> echo getsorttype('notattending',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Event','ajaxlist','detail','<php> echo getsorttype('detail');</php>','Event_Grid')"  title="按照活动详细内容排序">活动详细内容
      <php> echo getsorttype('detail',1);</php>
      </a> </th>
    
    <th >操作区域</th>
  </tr>
  <php> if(isset($list)): </php>
  <php> $i = 0; </php>
  <php> if( count($list)==0 ) echo "" </php>
  <php> foreach($list as $key=>$list): </php>
  <php> ++$i;</php>
  <php> $mod = (($i % 2 )==0)</php>
  <php> if(($key%2)==0){ $tablesclass="ewTableAltRow";} else { $tablesclass="ewTableRow";} </php>
  <tr class="{$tablesclass}" onmouseover="ew_mouseover(this);" onmouseout="ew_mouseout(this);" onclick="ew_click(this);"  >
    <td><input type="checkbox" name="key"	value="{$list.id}"></td>
    
    <td title="资源ID"> <mkrtags:text id="aid" name="aid"  value="$list['aid']"/> </td>
    
    <td title="报名截止时间"> <mkrtags:text id="deadline" name="deadline"  value="$list['deadline']"/> </td>
    
    <td title="活动开始时间"> <mkrtags:text id="starttime" name="starttime"  value="$list['starttime']"/> </td>
    
    <td title="活动结束时间"> <mkrtags:text id="endtime" name="endtime"  value="$list['endtime']"/> </td>
    
    <td title="公开状态:0私密,1半公开,2完全公开"> <mkrtags:text id="public" name="public"  value="$list['public']"/> </td>
    
    <td title="成员数"> <mkrtags:text id="membernum" name="membernum"  value="$list['membernum']"/> </td>
    
    <td title="参与"> <mkrtags:text id="attending" name="attending"  value="$list['attending']"/> </td>
    
    <td title="可能参与"> <mkrtags:text id="mightatten" name="mightatten"  value="$list['mightatten']"/> </td>
    
    <td title="不参与"> <mkrtags:text id="notattending" name="notattending"  value="$list['notattending']"/> </td>
    
    <td title="活动详细内容"> <mkrtags:text id="detail" name="detail"  value="$list['detail']"/> </td>
    
    <td>
    	<a href="javascript:edit('{$list.id}')" title="编辑本信息">编辑</a>
     	<a href="javascript:del('{$list.id}')" title="删除本信息">删除</a>
     	<a href="javascript:view('{$list.id}')" title="查看详细信息">详细</a>
    </td>
  </tr>
  <php> endforeach; </php>
  <php> endif; </php>
</table>
<!--Myhtml系统列表组件结束 -->
<!--  分页显示区域 -->
<div class="page">
  <table width="100%">
    <tr>
      <td align="left"></td>
      <td align="right">{$page}</td>
    </tr>
  </table>
</div>
<!--  分页显示区域结束 -->
